home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / demos / 11 / general / onedrv.doc < prev    next >
Encoding:
Text File  |  1986-04-17  |  5.6 KB  |  103 lines

  1. USING PERSONAL PASCAL WITH A SINGLE DISK DRIVE ST SYSTEM 
  2. -------------------------------------------------------- 
  3.  
  4.  
  5. If you have only one single-sided disk drive, using Personal Pascal to 
  6. write  programs  of any practical size requires some planning and disk 
  7. organization.    More  specifically,  the  Pascal  disk,  as  shipped, 
  8. contains enough free space to compile perhaps two or three of the very 
  9. small  demo  programs  included  on  it.   In following paragraphs, we 
  10. describe suggested steps to take (in order of their effectiveness)  in 
  11. order to be able to compile larger programs.   Owners of 1040ST's will 
  12. find  some  information  of  value here, though simply copying all the 
  13. Personal Pascal files to a double sided diskette  will  probably  give 
  14. you all the space you need for most projects. 
  15.  
  16. [  1.  ]    Buy  a  second  drive.   You weren't looking for expensive 
  17. advice like this?   Sorry, keep reading:  we get  cheaper  as  we  go. 
  18. (But  we  still think that this is the only viable long-range solution 
  19. for not only Pascal but  several  other  existing  or  anticipated  ST 
  20. products.) 
  21.  
  22. [  2.  ]    Remove  all  files  in the DEMO and INFO folders from your 
  23. working copy of the disk.   Remove the folders, also.   You should now 
  24. be able to write 200 to 300 line programs. 
  25.  
  26. [ 3. ]   If you have not yet purchased and installed the TOS ROMs,  do 
  27. so!!!   Then obtain a RamDisk program (there are a couple of free ones 
  28. on  CompuServe  and various bulletin boards) and allocate no more than 
  29. 200K bytes to the RamDisk (160K may be a better compromise).   You may 
  30. use the RamDisk to hold your source code,  work  files  (see  "Compile 
  31. Options" menu item), and/or the library files (as described in section 
  32. 3,  below).    This  is  not only a relatively easy option, it is also 
  33. fairly  effective:   compiles  and/or  links  will   be   speeded   up 
  34. considerably.    PLEASE,  PLEASE,  PLEASE, though, BEFORE you run your 
  35. compiled program, go back to the desktop and  copy  your  source  code 
  36. from the RamDisk to a physical diskette!   Thanks. 
  37.  
  38. SPECIAL NOTE:   At 200K bytes, though, the RamDisk is not large enough 
  39. to  hold  the  compiler  and its associated files (and if you make the 
  40. RamDisk larger, you won't have  room  in  normal  memory  to  run  the 
  41. compiler...catch  22).    However,  if you own a 1040ST (or are one of 
  42. those brave souls who has upgraded your 520ST to a megabyte  of  RAM), 
  43. you  can  create a 600K or 700K RamDisk, which is large enough to hold 
  44. all the Personal Pascal files (compiler, linker, libraries,  etc.)  as 
  45. well as all the temporary files produced during a compile. 
  46.  
  47. [  4. ]   Copy the files PASLIB and PASGEM to another diskette.   Then 
  48. remove both of them from your working disk.   Then  edit  and  compile 
  49. (do NOT link) the following program: 
  50.      (*$M+,E-,D-*) (* a module, but no external access, no debug *) 
  51.      PROGRAM JUNK(); 
  52.        BEGIN 
  53.        END. 
  54. From  the  GEM  desktop,  rename  the object file you just produced to 
  55. "PASLIB" (no extension).   Then compile  the  program  again  (without 
  56. linking!) and rename the object file "PASGEM" (no extension). 
  57.  
  58. Back  in  the Personal Pascal manager, specify "additional link files" 
  59. as follows: 
  60.     B:PASGEM,B:PASLIB 
  61. (if linking for GEM) or just 
  62.     B:PASLIB 
  63. (if linking for TOS).   It's a good idea to then  save  these  options 
  64. (using the menu item "Save Options"). 
  65.  
  66. The  effect of all this is strange and wonderful:   when it comes time 
  67. to link your program, the  manager  AUTOMATICALLY  requests  that  the 
  68. files "PASGEM" and/or "PASLIB" be linked with your file ("PASGEM" only 
  69. if  you  chose  the  "link  for  GEM"  option).   But now "PASGEM" and 
  70. "PASLIB" are junk files, containing only  a  single  dummy  procedure. 
  71. However,  since  you  asked  for  the  "additional" link file(s) to be 
  72. included from drive B, the linker obligingly asks the operating system 
  73. for them.   Here is one place where TOS really shines:   when you  ask 
  74. for  a  file from drive B and drive B doesn't exist, TOS automatically 
  75. prompts you to remove the "A:" diskette and insert the "B:" diskette!! 
  76. And, when it is time to go back and read or write files from/to  drive 
  77. A, TOS prompts you again. 
  78.  
  79. So  simply  follow  the  TOS  prompts.   When it asks you for the "B:" 
  80. diskette, insert the one on which you placed the copies of PASLIB  and 
  81. PASGEM.   Then, when it asks you to insert the "A:" diskette, reinsert 
  82. your  working disk.   Voila!   You just gained about 80K bytes on your 
  83. working disk. 
  84.  
  85. COMMENTARY:   Although TOS allows you to specify "B:" for any file and 
  86. will keep careful track of all swaps needed, we chose to move only the 
  87. library files to the second disk in order to minimize  the  number  of 
  88. disk  swaps necessary.   When the linker is reading in a library file, 
  89. no other files are open, so a swap is necessary only at the  beginning 
  90. and  end  of  the file read.   If we were to put your source file (for 
  91. example) on diskette "B:," you would have to swap several times as the 
  92. various "INCLUDE" files were encountered and/or as the object file was 
  93. written.   However, if you are desparate, you  might  try  moving  ALL 
  94. source  files  (including  GEMSUBS.PAS, GEMTYPE.PAS, etc.) to disk B:. 
  95. What we are doing this way is turning the situation  around:    almost 
  96. all  files  will come from diskette "B:," and the only time the system 
  97. will need to swap to "A:" is when it needs to load one of the Personal 
  98. Pascal ".PRG" programs (the editor, compiler, or  linker).    CAUTION: 
  99. we have not tried this procedure as of this writing.   Use at your own 
  100. risk. 
  101.  
  102.  
  103. əəəəəəəəəəəəəəəəəəəəəəəəəəəəəə